

#include "cs_defline.h"



void* cs_malloc(size_t size){
    void* pp = (void*)malloc(size);
    if (pp == NULL){
        printf("内存申请失败.............\n");
        print_callstack(NULL);
        exit(1);
    }
    return pp;
}

void* cs_realloc(void* pp, size_t size){
    if (pp != NULL){
        void* p0 = realloc(pp, size);
        if (p0 == NULL){
            printf("内存空间重新设置失败...........\n");
            print_callstack(NULL);
            exit(1);
        }
        pp = p0;
    } else{
        printf("无法设置内存空间.....pp==NULL........\n");
        print_callstack(NULL);
    }
}